class Test {
    int num;
    double f1;
    public:
    Test(int n) {num = n;}
    Test(int n,double f) {
        num = n;
        f1 = f;
    }

    int getNum() {
        return num;
    }

    double getF() {
        return f1;
    }
};

#include<iostream>
using namespace std;
int main() {
    Test one[2] = {2,4},*p;
    Test two[2] = {Test(1,3.2),Test(5,9.5)};
    for (int i = 0;i < 2;i++) {
        cout << "one["<<i<<"] = " << one[i].getNum() << endl;
    }

    p = two;
    for (int i = 0;i < 2;i++,p++) {
        cout << "two["<<i<<"] = (" << p->getNum() << "," << p->getF()
            << ")" << endl;
    }

    Test * three[2] = {new Test(3),new Test(4)};
    Test * four[2] = {new Test(1,3.1),new Test(2,4.1)};

    for (int i = 0;i < 2;i++) {
        cout << "three["<<i<<"] = " << three[i]->getNum() << endl;
    }

    for (int i = 0;i< 2;i++) {
        cout << "four["<<i<<"] = " << four[i]->getNum() << endl;
    }

    for (int i = 0;i< 2;i ++) {
        delete three[i];
        delete four[i];
    }
}
